package com.project.bean;

/**
 * 购物车实体类
 *
 * @author lyl
 */
public class ShopCarBean {
    /**
     * 购物车编号
     */
    private int shopCarId;
    /**
     * 所属的用户
     */
    private UserBean userBean;
    /**
     * 商品对象
     */
    private ProductBean productBean;
    /**
     * 购买数量
     */
    private int num;

    public ShopCarBean() {
    }

    public ShopCarBean(int userId, int productId) {
        this.userBean = new UserBean();
        userBean.setUserId(userId);
        this.productBean = new ProductBean();
        productBean.setProductId(productId);

    }

    public int getShopCarId() {
        return shopCarId;
    }

    public void setShopCarId(int shopCarId) {
        this.shopCarId = shopCarId;
    }

    public UserBean getUserBean() {
        return userBean;
    }

    public void setUserBean(UserBean userBean) {
        this.userBean = userBean;
    }

    public ProductBean getProductBean() {
        return productBean;
    }

    public void setProductBean(ProductBean productBean) {
        this.productBean = productBean;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    @Override
    public String toString() {
        return "ShopCarBean{" +
                "shopCarId=" + shopCarId +
                ", userBean=" + userBean +
                ", productBean=" + productBean +
                ", num=" + num +
                '}' + "\n";
    }
}
